package me.shibor.study.quartz.job;

import org.quartz.Job;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobKey;

public class HelloJob implements Job {

	public HelloJob() {

		System.out.println("hello job init...");
		
	}

	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {

		System.out.println("hello!");
		
		JobKey key = context.getJobDetail().getKey();
		
		JobDataMap dataMap = context.getJobDetail().getJobDataMap();
		
		String jobSays = dataMap.getString("jobSays");
		float myFloatValue = dataMap.getFloat("myFloatValue");
		
		System.err.println("Instance " + key + " of DumbJob says: " + jobSays + ", and val is: " + myFloatValue);
	}
	
	private int test;

	public int getTest() {
		System.out.println("getTest()");
		return test;
	}

	public void setTest(int test) {
		
		System.out.println("setTest");
		this.test = test;
	}
	
	

}
